package Problem;

import java.time.LocalDate;
import java.util.List;
import java.util.Scanner;

//
// Created by ✎﹏ℳ๓独赏☆独醉 on 2024/1/22.
// 
public class 合法日期 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        LocalDate date;
        int month = scan.nextInt();
        if(month>0 && month<13){
            int day = scan.nextInt();
            date = LocalDate.of(2021,month,1);
            if(day <= date.lengthOfMonth()){
                System.out.println("yes");
            } else {
                System.out.println("no");
            }
        }else {
            System.out.println("no");
        }

    }
}
